40923247 cp2020

  • Home
    • Site Map
    • reveal
    • blog
  • 首頁
  • HW1
    • U13
      • IPv4 and IPv6 Addresses
      • IPv4 Addressing
      • IPv4 Address Classes
      • Assigning an IP Address 分配IP地址
      • IPv6
      • Classful Vs  Classless Addressing  Subnet and CIDR
      • Windows Networking Windows網絡
    • U14
      • Overview 概述
      • TCP and UDP
      • TCP IP Stack
      • Networking Transfer Protocols 網絡傳輸協議
      • FTP
      • SSL
  • HW2
    • 2-1
    • 2-2
    • 2-3
  • HW3
    • Exercise 34 練習34
    • Exercise 24  練習24
    • Exercise 28  練習28
IPv6 << Previous Next >> Windows Networking Windows網絡

Classful Vs  Classless Addressing  Subnet and CIDR

相對於 無類尋址:子網和CIDR

The IP address always determines the class of a network and never the subnet. When the IP addresses match, the network is said to be using a “classful” scheme. However, this allows for many wasted IP addresses when a company needs more publicly routable IP addresses than the address class they are using offers. Classless inter-domain routing (CIDR) was developed in order to make the IP addressing scheme more efficient and to delay the depletion of IPv4 addresses. Essentially, some of the network bits in the default subnet mask are borrowed and used for the host portion of the network. For example, if a business needs 300 public IP addresses, then class C addresses would be too small because of the 254 device limitation, and class B would be excessively large. With CIDR, a business could be assigned an IP address range with a subnet of 255.255.254.0/23. In CIDR notation, “/23” indicates that the first 23 bits of the address are the network part of the address, which leaves the last nine bits for host addresses, rather than the eight bits that would be available in classful addressing. That means there will now be 510 IP numbers available rather than 254.

IP地址始終確定網絡的類別,而不是子網。如果IP地址匹配,則稱網絡正在使用“分類”方案。但是,當公司需要比他們使用的地址類更多的可公共路由的IP地址時,這會浪費許多IP地址。開發無類域間路由(CIDR)的目的是使IP尋址方案更高效並延遲IPv4地址的耗盡。本質上,默認子網掩碼中的某些網絡位被借用並用於網絡的主機部分。例如,如果一家企業需要300個公共IP地址,則由於254個設備限制,C類地址將太小,而B類將太大。使用CIDR,可以為企業分配IP地址範圍,其子網為255.255.254.0/23。在CIDR表示法中,“ / 23”表示地址的前23位是地址的網絡部分,剩下的最後9位用於主機地址,而不是分類尋址中可用的8位。這意味著現在將有510個IP號碼,而不是254個。

Private Vs. Public IP Addresses 私人vs. 公用IP地址

IPv4 depletion affects public addresses that are routable on the Internet by such devices as routers and servers, as well as the device used to connect your home to the Internet. Whether it is a cable modem, DSL, or FIOS, that device has a public IP address that communicates with your Internet service provider (ISP). This is an example of a WAN. The LAN (local area network) is wholly comprised of private IP addresses.

IPv4耗盡會影響路由器和服務器等設備以及用於將您的房屋連接到Internet的設備在Internet上可路由的公共地址。 無論是電纜調製解調器,DSL還是FIOS,該設備都具有與Internet服務提供商(ISP)通信的公共IP地址。 這是WAN的示例。 LAN(局域網)完全由專用IP地址組成。

RFC1918 name

IP address range

Number of addresses

Largest CIDR block (subnet mask)

Host ID size

Mask bits

Classful description

24-bit block

10.0.0.0 - 10.255.255.255

16,777,216

10.0.0.0/8 (255.0.0.0)

24 bits

8 bits

single class A network

20-bit block

172.16.0.0 - 172.31.255.255

1,048,576

172.16.0.0/12 (255.240.0.0)

20 bits

12 bits

16 contiguous class B networks

16-bit block

192.168.0.0 - 192.168.255.255

65,536

192.168.0.0/16 (255.255.0.0)

16 bits

16 bits

256 contiguous class C networks

Table used under CC-BY license from Wikipedia.

In order for a LAN node to access the Internet, IPv4 uses network address translation (NAT), which is a technique where the gateway/router would replace the outgoing private IPv4 address with the publically routable address assigned by the ISP.

為了使LAN節點能夠訪問Internet,IPv4使用網絡地址轉換(NAT),該技術是網關/路由器將出站專用IPv4地址替換為ISP分配的可公開路由的地址。

 

Static Vs. Dynamic IP Addressing 靜態與 動態IP尋址

Historically, the client (a workstation or a printer) would be assigned a static IP address manually using the operating system IPv4 configuration. Remember, you must have unique IP addresses in any network. Imagine how difficult it was in a large corporation to track all the different nodes and IP addresses. Dynamic host configuration protocol (DHCP) solves this problem by having one device (a server or a router) automatically assign an IP address. In the current network structure, you would still assign static IP addresses to devices that must have guaranteed connectivity: servers, routers, managed switches, etc. However, DHCP can provide many benefits in networking maintenance with the abundant wireless devices such as cell phones, tablets, and laptops coming in and out of a network daily. Companies have developed policies for employees to bring their own devices to work, thus accessing the corporate network. DHCP will give the client setup parameters (gateway, domain, and name servers), keeping a specific pool of IP addresses, and offering timed leases for a device’s IP assignment.

從歷史上看,將使用操作系統IPv4配置為客戶端(工作站或打印機)手動分配靜態IP地址。請記住,任何網絡中都必須具有唯一的IP地址。想像一下,在大型公司中跟踪所有不同的節點和IP地址有多麼困難。動態主機配置協議(DHCP)通過讓一台設備(服務器或路由器)自動分配IP地址來解決此問題。在當前的網絡結構中,您仍將靜態IP地址分配給必須保證連接性的設備:服務器,路由器,受管理的交換機等。但是,DHCP可以通過大量的無線設備(例如手機,平板電腦和筆記本電腦每天進出網絡。公司已製定政策,要求員工使用自己的設備來工作,從而訪問公司網絡。 DHCP將提供客戶端設置參數(網關,域和名稱服務器),保留特定的IP地址池,並為設備的IP分配提供定時租用。

 

APIPA Link-Local APIPA 本地鏈接

Link-local addresses are special addresses assigned by the operating system when either there is no statically assigned IP address, or the DHCP does not assign one to the network interface. Link-local addresses are not routable and only function in a LAN segment. In IPv4, the address range is 169.254.0.0/16 and the form is 169.254.x.x. In IPv6, the form is FE80::/64. In a Microsoft OS, the link-local address is referred to as automatic private IP addressing (APIPA).

If you are troubleshooting an NIC (network interface card) that is supposed to be connected and you see a link-local address, this indicates that there is something wrong with the configuration because the OS assigned the address.

當沒有靜態分配的IP地址,或者DHCP沒有為網絡接口分配一個IP地址時,本地鏈接地址是操作系統分配的特殊地址。 本地鏈接地址不可路由,只能在LAN網段中使用。 在IPv4中,地址範圍為169.254.0.0/16,格式為169.254.x.x。 在IPv6中,格式為FE80 :: / 64。 在Microsoft操作系統中,本地鏈接地址稱為自動專用IP尋址(APIPA)。

如果要對應該連接的NIC(網絡接口卡)進行故障排除,並且看到鏈接本地地址,則表明配置有問題,因為操作系統分配了該地址。

Client-side DHCP 客戶端DHCP

DHCP works by having an authoritative device, either a server or a router, offering to assign the IP address. In order for this to work, the client must be configured to look for the DHCP authority, and confirm that it will accept the IP assignment. These settings are located in “network connections” through either the network and sharing center or directly through the control panel. The configuration settings are located in the properties of the connection under either IPv4 or IPv6.

DHCP通過擁有授權設備(服務器或路由器)來分配IP地址而起作用。 為了使它起作用,必須將客戶端配置為尋找DHCP授權,並確認它將接受IP分配。 這些設置通過網絡和共享中心位於“網絡連接”中,也可以直接通過控制面板位於“網絡連接”中。 配置設置位於IPv4或IPv6下的連接屬性中。

 

Client-side DNS settings 客戶端DNS設置

The domain name system (DNS) is a part of the Internet protocol that translates IP addresses to name addresses. There is a setting located in the network properties section of the IPv4 or IPv6 property window that allows for the manual setting of the the domain name system (DNS) server address. The local DNS cache will keep a local record of IP address to name conversion for both LAN devices and Internet addresses. Alternate DNS server addresses can be added to the client to assist in name resolution, thus improving data flow.

域名系統(DNS)是Internet協議的一部分,該協議將IP地址轉換為名稱地址。 IPv4或IPv6屬性窗口的網絡屬性部分中有一個設置,允許手動設置域名系統(DNS)服務器地址。 本地DNS緩存將保留IP地址到LAN設備和Internet地址的名稱轉換的本地記錄。 可以將備用DNS服務器地址添加到客戶端以幫助名稱解析,從而改善數據流。

Gateway 閘道器

The gateway is the device that connects different networks types together. In most SOHO (small office, home office) environments today, this is the router that connects the LAN to the ISP modem through the WAN port (cable, DSL, or FIOS), which provides Internet access. In a larger corporate environment, it is the last router in the LAN that connects to a WAN link, and then passes the IP packets to their destination. The difference is that in a larger corporate environment, there can be multiple LAN segments and routers between the client workstation and the gateway.

網關是將不同網絡類型連接在一起的設備。 在當今的大多數SOHO(小型辦公室,家庭辦公室)環境中,這是通過WAN端口(電纜,DSL或FIOS)將LAN連接到ISP調製解調器的路由器,可以提供Internet訪問。 在較大的公司環境中,它是LAN中的最後一個路由器,該路由器連接到WAN鏈接,然後將IP數據包傳遞到其目的地。 區別在於,在較大的公司環境中,客戶端工作站和網關之間可以有多個LAN網段和路由器。


IPv6 << Previous Next >> Windows Networking Windows網絡

Copyright © All rights reserved | This template is made with by Colorlib